package com.express.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author
 * @since 2025-01-24
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("orders")
@ApiModel(value = "Orders对象", description = "")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "order_id", type = IdType.AUTO)
    private Long orderId;
    //收件人ID
    private Long userId;
    //快递员ID
    private Long courierId;
    //快递柜ID
    private Long lockerId;
    //柜门ID
    private Long doorId;
    //快递单号
    private String expressNumber;
    //收件人信息
    private String recipientInfo;
    /**
     * 订单状态说明:
     * 0:已下单(用户下单待快递员存入)
     * 1:已寄送(快递员已存入快递柜待用户取件)
     * 2:已取件(用户取件成功)
     * 3:异常(异常订单，例如超时未取，柜门损坏等)
     */
    private Integer status;
    //取件码（加密）
    private String pickupCode;

    private LocalDateTime creationTime;
    //预计到达时间
    private LocalDateTime pickupTime;


}
